#ifndef PROJECTCONTEXTMENU_H
#define PROJECTCONTEXTMENU_H

#include <QtGui>

namespace Ui {
    class ProjectContextMenu;
}

namespace OType
{
    typedef enum { UNDEFINED = 0, SOURCE, HEADER, APPLICATION, FOLDER} ObjectType;
}

class ProjectContextMenu : public QWidget {
    Q_OBJECT
public:
    ProjectContextMenu(QWidget *parent = 0);
    ~ProjectContextMenu();
    void setObject(QTreeWidgetItem*);
    void setObjectName(const QString&);
    void setObjectType(const QString&);
    void setObjectDescription(const QString&);
    void setProjectSettingVisible(bool = true);
    void setFileRename(bool = true);
    OType::ObjectType type(const QString&);
protected:
    void changeEvent(QEvent *e);

private:
    QTreeWidgetItem* m_object;
    Ui::ProjectContextMenu *m_ui;
    QIcon m_folderIcon;
    QIcon m_sourceIcon;
    QIcon m_headerIcon;
    QIcon m_undefinedIcon;
    QIcon m_applicationIcon;
    inline const QString& objectName(){ return m_object->text(0);}
    inline const QString& objectPath(){ return m_object->text(1);}
    inline const QString& objectType(){ return m_object->text(2);}
private slots:

private slots:
    void on_saveBtn_clicked();
    void on_projectSettings_clicked();
    void on_deleteBtn_clicked();
    void on_addFile_clicked();
    void on_renameLineEdit_lostFocus();
    void on_renameLineEdit_returnPressed();
    void on_renameBtn_clicked();
    void on_save_clicked();
};

#endif // PROJECTCONTEXTMENU_H
